package cn.dzz.springcloud.controller;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.UUID;

/**
 * @author DaiZhiZhou
 * @file SpringCloud-ATGG-2020
 * @create 2020-08-26 10:11
 */
@RestController
@Slf4j
@RequestMapping("payment")
public class ConsulPaymentController {

    @Value("${server.port}")
    private String serverPort;

    @RequestMapping("consul") // payment/consul
    public String paymentConsul(){
        return "SpringCloud with Consul : " + serverPort + "\t" + UUID.randomUUID().toString();
    }

}
